<nav class="header navbar navbar-default navbar-static-top -left" id="sidebar--nav">
<div class="container-fluid header--container -left">

    <ul class="nav navbar-nav navbar-left header--col--left">
        <li class="header--col--left--drawer">
            <a href="#{{args.currentUrl}}" class="btn-link header--title sidemenu--open -text-elipsis">
                <i class="icon-menu header--icon"></i>
                <span id="header--title" class="hidden-xs hidden-sm">
                    {{i18n(args.title)}}
                </span>
            </a>
        </li>
        <li class="header--col--left--search">
            <button id="header--sbtn" class="btn navbar-btn header--sbtn" title="{{i18n('Search')}}">
                <i class="icon-search"></i>
            </button>
        </li>
    </ul>

    <form id="header--search" class="header--search" role="search">
        <input id="header--search--input" class="header--search--input form-control"
            type="text" placeholder="{{i18n('Search')}}" value="{{args.query}}" />
    </form>

    <div class="navbar-right header--right navbar-btn">
        <% if (isSyncEnabled()) { %>
        <button class="btn header--sbtn col-xs-6" id="header--sync">
            <span id="header--sync--icon" class="icon-arrows"></span>
        </button>
        <% } %>
        <button id="header--add" class="header--add btn btn-danger">
            <span class="icon-doc-new"></span>
        </button>
    </div>

</div>
</nav>

<div class="sidemenu">
    <div class="list-group">
        <div class="list-group-item sidemenu--item -disabled sidemenu--close">
            <i class="icon-left-open-big"></i>
            {{i18n('Close')}}
            <button type="button" class="close" aria-hidden="true">
                &times;
            </button>
        </div>

        <a class="list-group-item sidemenu--item" href="#{{uri}}notes">
            <i class="icon-note"></i> {{i18n('All notes')}}
        </a>
        <a class="list-group-item sidemenu--item" href="#{{uri}}notes/f/favorite">
            <i class="icon-favorite"></i> {{i18n('Favourites')}}
        </a>
        <a class="list-group-item sidemenu--item" href="#{{uri}}notes/f/trashed">
            <i class="icon-trashed"></i> {{i18n('Trash')}}
        </a>
        <a class="list-group-item sidemenu--item" href="#{{uri}}notebooks">
            <i class="icon-notebook"></i> {{i18n('Notebooks & tags')}}
        </a>
        <a class="list-group-item sidemenu--item" href="#{{ uri }}notes/f/task">
            <i class="icon-ok"></i> {{ i18n('Open tasks') }}
        </a>

        <% if (notebooks !== null && notebooks.length) { %>
        <div class="list-group-item sidemenu--item -disabled">{{i18n('Notebooks')}}</div>
        <% notebooks.forEach(function(notebook) { %>
        <a class="list-group-item sidemenu--item" href="#{{uri}}notes/f/notebook/q/{{notebook.id}}">
            <i class="icon-notebook"></i>  {=cleanXSS(notebook.name)}
        </a>
        <% }); } %>

        <div class="list-group-item sidemenu--item -disabled">{{i18n('Profiles')}}</div>
        <a class="list-group-item sidemenu--item<% if (profile === 'notes-db' || !profile) { %> active<% } %>" href="#/notes">
            <i class="icon-user"></i>  {{i18n('Default')}}
        </a>
        <% _.forEach(profiles, function(prof) { %>
        <% if (prof !== 'notes-db') { %>
        <a class="list-group-item sidemenu--item<% if (profile === prof) { %> active<% } %>" href="#{{profileLink(prof)}}">
            <i class="icon-user"></i>  {{prof}}
        </a>
        <% } }); %>

        <div class="list-group-item sidemenu--item -disabled">{{i18n('Other')}}</div>
        <a class="list-group-item sidemenu--item" href="#{{uri}}settings">
            <i class="icon-cog"></i>  {{i18n('Settings')}}
        </a>
        <a id="header--about" class="list-group-item sidemenu--item" href="#">
            <i class="icon-help-circled"></i>  {{i18n('About')}}
        </a>
    </div>
</div>
